package com.yincheng.oes.business.exam.export.analysispaper.entity;

import com.yincheng.oes.business.base.entity.Question;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 测评试卷实体类
 *
 * @author yangsy
 *
 */
public class PaperResult {

    /**
     * 试卷id
     */
    private String paperId;

    /**
     * 答卷id
     */
    private String paperResultId;

    /**
     * 试卷名称
     */
    private String paperName;

    /**
     * 学生id
     */
    private String studentId;

    /**
     * 学生姓名
     */
    private String studentName;

    /**
     * 完成时间
     */
    private Date endTime;

    /**
     * 得分
     */
    private Double score;

    /**
     * 满分
     */
    private Double totalScore;

    /**
     * 助教姓名
     */
    private String assistantName;

    /**
     * 错误知识点集合
     */
    private List<AnalysisKnowledge> wrongKnowleges;

    /**
     * 错题集合
     */
    private List<Question> wrongQuestions;

    /**
     * A2类型题目集合
     */
    private Map<String, List<Question>> a2Questions;

    public String getAssistantName() {
        if(StringUtils.isEmpty(assistantName)){
            return "";
        }
        return assistantName;
    }

    public void setAssistantName(String assistantName) {
        this.assistantName = assistantName;
    }

    public Double getTotalScore() {
        return totalScore;
    }

    public void setTotalScore(Double totalScore) {
        this.totalScore = totalScore;
    }

    public Map<String, List<Question>> getA2Questions() {
        return a2Questions;
    }

    public void setA2Questions(Map<String, List<Question>> a2Questions) {
        this.a2Questions = a2Questions;
    }

    public String getPaperId() {
        return paperId;
    }

    public void setPaperId(String paperId) {
        this.paperId = paperId;
    }

    public String getPaperResultId() {
        return paperResultId;
    }

    public void setPaperResultId(String paperResultId) {
        this.paperResultId = paperResultId;
    }

    public String getPaperName() {
        return paperName;
    }

    public void setPaperName(String paperName) {
        this.paperName = paperName;
    }

    public String getStudentId() {
        return studentId;
    }

    public void setStudentId(String studentId) {
        this.studentId = studentId;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Double getScore() {
        return score;
    }

    public void setScore(Double score) {
        this.score = score;
    }

    public List<AnalysisKnowledge> getWrongKnowleges() {
        return wrongKnowleges;
    }

    public void setWrongKnowleges(List<AnalysisKnowledge> wrongKnowleges) {
        this.wrongKnowleges = wrongKnowleges;
    }

    public List<Question> getWrongQuestions() {
        return wrongQuestions;
    }

    public void setWrongQuestions(List<Question> wrongQuestions) {
        this.wrongQuestions = wrongQuestions;
    }

    @Override
    public String toString() {
        return "PaperResult [paperId=" + paperId + ", paperResultId=" + paperResultId + ", paperName=" + paperName
                + ", studentId=" + studentId + ", studentName=" + studentName + ", endTime=" + endTime + ", score="
                + score + ", wrongKnowleges=" + wrongKnowleges + ", wrongQuestions=" + wrongQuestions + "]";
    }

}
